package in.freshstart.java.training.conditions;

public class MilliSecondsToHours {
	public static void main(String[] args) {
		int ms = 21000;
		System.out.println("Milli seconds are: " + ms);
		if (ms > 1000) {
			float seconds = ms / 1000F;
			int minutes = (int) (seconds / 60);
			int hours = minutes / 60;
			minutes = minutes - hours * 60;
			seconds = seconds - hours * 60 * 60 - minutes * 60;
			System.out.println("Hours: " + hours);
			System.out.println("Minutes: " + minutes);
			System.out.println("& Seconds: " + seconds);
		} else {
			System.out.println("Please give more than 1000 Milliseconds to conversion");
		}
	}

}
